import Api from '@/api/client/rebate'
import i18n from "@/lang/index";
const contentConfig = {
  pageName: "sys:user",
  table: {
    border: true,
    highlightCurrentRow: false,
  },
  defSearch: false,
  indexAction: (data) => {
    console.log("index", data);
    return new Promise((resolve, reject) => {
      Api.getList(data).then(s => {
        console.log(s);
        resolve(s)
      }).catch(e => {
        console.log(e);
        reject(e)
      })
    });
  },
  deleteAction: function (id) {
    console.log("delete", id);
    return new Promise((resolve, reject) => {
      resolve({
        code: "00000",
        data: null,
        msg: i18n.global.t("hint.7"),
      })

    });
  },
  exportAction: function (queryParams) {
    // 导出Excel文件
    // return exportUser(queryParams);
  },
  pk: "id",
  toolbar: [
    "refresh",
    "add",
    // "delete",
    // "export",
    // {
    //   name: "import",
    //   icon: "upload",
    //   text: "导入",
    //   auth: "import",
    // },
  ],
  cols: [
    { label: "ID", align: "center", prop: "id", width: 100,fixed: "left", },
    { label: i18n.global.t("label.64"), align: "center", prop: "vip_level_id", templet: 'custom',fixed: "left" },
    { label: i18n.global.t("label.97"), align: "center", prop: "bet_amount" },
    { label: i18n.global.t("label.98"), align: "center", prop: "rebate_rate" },
    {
      label: i18n.global.t("label.8"),
      fixed: "right",
      width: 220,
      align: "center",
      templet: "tool",
      operat: [
        'edit'
      ],
    },
  ],
};

export default contentConfig;
